package br.edu.ufcg.ga.stopcondition;

public class OptimalStopCondition extends StopCondition {

	private double optimalValue;

	public OptimalStopCondition(double optimalValue) {
		this.optimalValue = optimalValue;
	}

	@Override
	protected boolean workIsDone(int cGeneration, double cBestFitness) {
		return isEqual(this.optimalValue, cBestFitness);
	}

}